<template>
	<view class="ipad-container">
		<view class="header"></view>
		<view class="container-view">
			<view class="v-left">
				<view @click="setRoute(item)" class="item" :class="{'active': current.id==item.id}" v-for="item in routerList">
					{{item.name}}</view>
			</view>
			<view class="right">
				
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { onLoad } from '@dcloudio/uni-app';
	import { ref } from 'vue'
	let routerList = ref([
		{
			name: "街道总览",
			id: "jdzh",
			path: "/jdzh",
		},
		{
			name: "动态街情",
			id: "dtjq",
			path: "/ar",
		},
		{
			name: "预警中心",
			id: "event",
			path: "/event",
		},
		{
			name: "视频中心",
			id: "/videoasync",
			path: "/videoasync",
		},
	])
	let current = ref({})
	const setRoute = (instruction:Object) => {
		current.value = instruction
	}
</script>
<style lang="scss">
	.ipad-container {
		width: 100%;
		height: 100%;
		background: #002351;
		position: relative;
		padding: 50rpx 16rpx 16rpx 16rpx;

		.header {
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			height: 40rpx;
			background: url('/src/static/images/ipad/header.png');
			background-size: 100% 100%;
		}

		.container-view {
			width: 100%;
			height: 100%;
			background: linear-gradient(to bottom, rgba(13, 127, 232, 0.25) 0%, rgba(13, 127, 232, 0.4) 100%);
			display: flex;
			align-items: top;
		}

		.v-left {
			background: linear-gradient(to bottom, rgba(13, 127, 232, 0.25) 0%, rgba(13, 127, 232, 0.4) 100%);
			width: 148rpx;
			height: 100%;
			.item{
				width: 100%;
				height: 40rpx;
				text-align: center;
				line-height: 40rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				font-size: 11rpx;
				color: #FFFFFF;
				background: url('/src/static/images/ipad/nbg.png') no-repeat;
				background-size: 100% 100%;
				&.active{
					background: url('/src/static/images/ipad/abg.png') no-repeat;
					background-size: 100% 100%;
				}
			}
		}

		.v-right {
			flex: 1;
			height: 100%;
		}
	}
</style>